const {
  defineConfig
} = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  configureWebpack: {
    devServer: {
      proxy: {
        '/api': {
          target: 'https://interface.sina.cn', //新浪免费接口
          changeOrigin: true,
          ws: true,
          pathRewrite: { // 重写路径，替换请求地址中的指定路径
            '^/api': ''
          }
        },
        '/foo': {
          target: 'http://apis.juhe.cn', //新浪免费接口
          changeOrigin: true,
          ws: true,
          pathRewrite: { // 重写路径，替换请求地址中的指定路径
            '^/foo': ''
          }
        },
      }
    }
  },
})
